package obj;

/**
 * @author:WIN10
 * @date:2022/1/15
 * @describe:父类：宠物类
 */
public abstract class Animal {

    //叫的一个抽象方法
    public abstract void eat();

    //姓名
    public String name;
    //健康值
    private int health;
    //亲密度
    private int love;

    public Animal() {

    }

    public Animal(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    public int getLove() {
        return love;
    }

    public void setLove(int love) {
        this.love = love;
    }
}
